package com.sky.business.sys.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.sky.common.enums.Arch;
import com.sky.common.enums.ContainerStatus;
import com.sky.common.enums.TaskType;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 容器配置
 */
@Data
@TableName(value = "d_container", autoResultMap = true)
public class Container implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 容器id
     */
    @TableField(value = "docker_id")
    private String dockerId;

    /**
     * 名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 配置id
     */
    @TableField(value = "config_id")
    private Integer configId;

    /**
     * 镜像名
     */
    @TableField(value = "image")
    private String image;

    /**
     * 架构
     */
    @TableField(value = "arch")
    private Arch arch;

    /**
     * 任务类型
     */
    @TableField(value = "task_type")
    private TaskType taskType;

    /**
     * 状态
     */
    @TableField(value = "`status`")
    private ContainerStatus status;

    /**
     * 主机id
     */
    @TableField(value = "node_id")
    private Integer nodeId;

    /**
     * 设备id
     */
    @TableField(value = "camera_config_id")
    private Integer cameraConfigId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_del")
    private Boolean isDel = false;
}